﻿#include <iostream>
using namespace std;
#include <vector>
#include<string>


//密码强度等级
//https://www.nowcoder.com/questionTerminal/52d382c2a7164767bca2064c1c9d5361?orderByHotValue=1&commentTags=Java
int main()
{
	string str;
	getline(cin, str);
	size_t strength = 5;
	if (str.size() > 4 && str.size() < 8) { strength = 10; }
	else if (str.size() > 7) { strength = 25; }
	char ASCII[128] = { 0 };
	int flag = 0, flbg = 0, flcg = 0;
	for (const auto& s : str)
	{
		++ASCII[s];
	}
	for (int i = 0; i < 128; ++i)
	{
		if (ASCII[i] && i >= 'a' && i <= 'z')
		{
			++flag;
			i = 'z';
		}
		else if (ASCII[i] && i >= 'A' && i <= 'Z')
		{
			++flag;
			i = 'Z';
		}
		else if (ASCII[i] && i >= '0' && i <= '9')
		{
			++flbg;
		}
		else if (ASCII[i])
		{
			++flcg;
		}
	}
	if (flag == 1) { strength += 10; }
	else if (flag == 2) { strength += 20; }

	if (flbg == 1) { strength += 10; }
	else if (flbg > 1) { strength += 20; }

	if (flcg == 1) { strength += 10; }
	else if (flcg > 1) { strength += 25; }

	if (flag == 2 && flbg && flcg) { strength += 5; }
	else if (flag && flbg && flcg) { strength += 3; }
	else if (flag && flbg) { strength += 2; }

	if (strength >= 90) { cout << "VERY_SECURE" << endl; }
	else if (strength >= 80) { cout << "SECURE" << endl; }
	else if (strength >= 70) { cout << "VERY_STRONG" << endl; }
	else if (strength >= 60) { cout << "STRONG" << endl; }
	else if (strength >= 50) { cout << "AVERAGE" << endl; }
	else if (strength >= 25) { cout << "WEAK" << endl; }
	else if (strength >= 0) { cout << "VERY_WEAK" << endl; }
	return 0;
}

//井字棋
//https://www.nowcoder.com/questionTerminal/e1bb714eb9924188a0d5a6df2216a3d1?orderByHotValue=0&done=0&pos=2&mutiTagIds=639_578&onlyReference=false
//适用于几乎所有自定义大小的棋盘
class Board {
public:
    bool checkWon(vector<vector<int> > board) {

        for (int i = 1; i < board.size() - 1; ++i) //检查行头尾
        {
            if (
                board[0][i - 1] == 1 && board[0][i] == 1 && board[0][i + 1] == 1
                || board[board.size() - 1][i - 1] == 1 && board[board.size() - 1][i] == 1 && board[board.size() - 1][i + 1] == 1
                )
            {
                return true;
            }
        }
        for (int i = 1; i < board[0].size() - 1; ++i) //检查列头尾
        {
            if (
                board[i - 1][0] == 1 && board[i][0] == 1 && board[i + 1][0] == 1
                || board[i - 1][board[0].size() - 1] == 1 && board[i][board[0].size() - 1] == 1 && board[i + 1][board[0].size() - 1] == 1
                )
            {
                return true;
            }
        }
        //在棋盘内判断行列和交叉
        for (int i = 1; i < board.size() - 1; ++i) //行
        {
            for (int j = 1; j < board[i].size() - 1; ++j) //列
            {
                if (
                    board[i][j - 1] == 1 && board[i][j] == 1 && board[i][j + 1] == 1
                    || board[i - 1][j] == 1 && board[i][j] == 1 && board[i + 1][j] == 1
                    || board[i - 1][j - 1] == 1 && board[i][j] == 1 && board[i + 1][j + 1] == 1
                    || board[i - 1][j + 1] == 1 && board[i][j] == 1 && board[i + 1][j - 1] == 1
                    )
                {
                    return true;
                }
            }
        }
        return false;
    }
};


//class Board {
//public:
//    bool checkWon(vector<vector<int> > board) {
//        for (int i = 0; i < 3; ++i)
//        {
//            if (board[i][0] == 1 && board[i][1] == 1 && board[i][2] == 1) { return true; }
//            else if (board[0][i] == 1 && board[1][i] == 1 && board[2][i] == 1) { return true; }
//        }
//        if ((board[0][0] == 1 && board[1][1] == 1 && board[2][2] == 1) || (board[0][2] == 1 && board[1][1] == 1 && board[2][0] == 1)) { return true; }
//        return false;
//    }
//};

int main()
{
    Board b;
    vector<vector<int> > vv = { {1,-1,-1},{1,1,1},{-1,-1,1} };
    b.checkWon(vv);
    return 0;
}